<?php
/**
 * 
 * 删除留言
 * @author LeoNing
 *
 */
class DelAsk extends Action {
	/* (non-PHPdoc)
	 * @see Action::execute()
	 */
	public function execute($params) {
		check_login ( ADMIN_LOGIN_PAGE );
		$ids = rqst ( 'aid' );
		$ids = safe_ids ( $ids, ",", true );
		
		if (! empty ( $ids )) {
			$cmM = new PlugAskModel ();
			$rst = $cmM->delete ( array ('ask_id IN' => $ids ) );
		} else {
			sess_add ( 'page_tip_info', '出错了,无效的留言编号.' );
		}
		Response::redirect ( $this->referer );
	}
}